<template>
  <header class="header">
    <div class="logo">🐾 宠物之家</div>
    <div class="search-bar">
      <input type="text" placeholder="搜索宠物商品..." />
      <button>搜索</button>
    </div>
    <nav class="user-nav">
      <a href="#">🐶 我的宠物</a>
      <a href="#">❤️ 收藏</a>
      <a href="#">🛒 购物车</a>
    </nav>
  </header>
</template>

<script>
export default {
  name: "Header",
};
</script>

<style scoped>
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #fff;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  font-size: 24px;
  font-weight: bold;
  color: #67c23a;
}
.search-bar {
  display: flex;
  flex-grow: 0.5;
}
.search-bar input {
  flex-grow: 1;
  padding: 8px 15px;
  border: 1px solid #e6e6e6;
  border-radius: 20px 0 0 20px;
  outline: none;
}
.search-bar button {
  padding: 8px 15px;
  background-color: #67c23a;
  color: white;
  border: none;
  border-radius: 0 20px 20px 0;
  cursor: pointer;
}
.user-nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #606266;
  font-size: 16px;
}
.user-nav a:hover {
  color: #67c23a;
}
</style>
